From 642c5961d3a521a15719b290c52d0e31e39fedf2 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 10 Sep 2005 14:19:09 +0000 Subject: [PATCH] One more instruction for the VMX MMIO decoder. This patch is to handle the instruction with opcode 0x80. Without this patch, the 64-bit VMX guest can't boot. Signed-off-by: Chengyuan Li --- xen/arch/x86/vmx_platform.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/vmx_platform.c b/xen/arch/x86/vmx_platform.c index 9a4381ce24..fa3173b9b7 100644 --- a/xen/arch/x86/vmx_platform.c +++ b/xen/arch/x86/vmx_platform.c @@ -425,10 +425,15 @@ static int vmx_decode(unsigned char *opcode, struct instruction *instr) GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); return reg_mem(instr->op_size, opcode, instr, rex); + case 0x80: case 0x81: if (((opcode[1] >> 3) & 7) == 7) { /* cmp $imm, m32/16 */ instr->instr = INSTR_CMP; - GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); + + if (opcode[0] == 0x80) + GET_OP_SIZE_FOR_BYTE(instr->op_size); + else + GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); instr->operand[0] = mk_operand(instr->op_size, 0, 0, IMMEDIATE); instr->immediate = get_immediate(vm86, opcode+1, BYTE); -- 2.30.2